(*****************************************************************************
 * Delphi Plug-in Framework (DPF)
 * Copyright (C) 2006-2007 Tao Yuan
 *
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the
 * License at http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.                                                               }
 *
 * The Initial Developer of the Original Code is Tao Yuan. Portions created by
 * Tao Yuan are Copyright (C) Tao Yuan (taoy.cn att gmail dott com)
 * All rights reserved.
 *****************************************************************************)
 
unit RDIdentity;

interface

uses
  Rcl, RdIntfs, RdClasses;

type 

  (**
   * Base interface for any plug-in manifest element class.
   * @version $Id: Identity.delphi,v 1.1 2004/11/30 18:45:20 ddimon Exp $
   *)
  IIdentity = interface(IRdInterface)
  ['{6262DBCF-D81D-41A9-A4E9-B6B3606E809F}']
    (**
     * @return ID of plug-in manifest element
     *)
    function getId: string; stdcall;
  end;

  (**
   * Interface to collect documentation data for some plug-in element.
   * @version $Id: Documentation.delphi,v 1.1 2004/11/30 18:45:20 ddimon Exp $
   *)
  IDocumentation = interface(IRdInterface)
  ['{A26A58B7-810E-4260-9146-745D2A37C953}']
    (**
     * @return plug-in element caption or empty string
     *)
    function getCaption: string; stdcall;
    (**
     * @return main documentation text or empty string
     *)
    function getText: string; stdcall;
    (**
     * @return collection of {@link Reference references} in this documentation
     *)
    function getReferences: IIntfCollection; stdcall;
    {**
     * @return element, for which this documentation is provided
     *}
    function getDeclaringIdentity: IIdentity; stdcall;
  end;

  (**
   * Base interface for those plug-in manifest element classes that may have UID.
   *
   * @see org.java.plugin.registry.PluginRegistry
   * @version $Id: UniqueIdentity.java,v 1.1 2005/12/10 13:13:06 ddimon Exp $
   *)  
  IUniqueIdentity = interface(IIdentity)
    (**
     * @return unique ID of plug-in element
     *)
    function getUniqueId: string; stdcall;
  end;

  (**
   * Interface to get access to plug-in element documentation.
   * @version $Id: Documentable.java,v 1.1 2004/11/30 18:45:20 ddimon Exp $
   *)
  IDocumentable = interface(IUniqueIdentity)
  ['{01FB5C98-7ABA-4C9F-AC15-E776A95D0A40}']
    (**
     * @return plug-in element documentation object or <code>null</code>
     *         if there is no documentation provided
     *)
    function getDocumentation: IDocumentation; stdcall;

    (**
     * @return path to documentation "home", it is used for resolving
     *         documentation references
     *)
    function getDocsPath: String; stdcall;
  end;

implementation

end.
